<include file="Public/Header" />
<div class="layout margin-top">
	<div class="container">
		<div class="line">
			<div class="x3">
				<include file="Public/MemberLeft" />
			</div>
			<div class="x9 padding-left">
				<div class="padding-bottom border">
					<form action="{:U('edit')}" method="post" class="form-auto">
						<div class="line margin-top">
							<dvi class="x2 text-right padding-right padding-small-top">
								视频分类
							</dvi>
							<dvi class="x10">
								<select name="video_cid" class="input radius-none">
									<option value="0">=== 请选择视频分类 ===</option>
									<?php foreach ($category_cache as $key => $ret): ?>
										<option value="<?php echo $ret['cate_id']?>" <?php if ($ret['cate_id'] == $video_info['video_cid']): ?> selected="selected" <?php endif; ?>>=== <?php echo $ret['name']; ?> ===</option>
									<?php endforeach; ?>
								</select>
							</dvi>
						</div>
						<div class="line margin-top">
							<dvi class="x2 text-right padding-right  padding-small-top">
								视频名称
							</dvi>
							<dvi class="x10">
								<input type="text" name="video_title" value="{$video_info.video_title}" class="radius-none input" size="35">
							</dvi>
						</div>
						<div class="line margin-top">
							<dvi class="x2 text-right padding-right  padding-small-top">
								关键词
							</dvi>
							<dvi class="x10">
								<input type="text" name="video_keywords" value="{$video_info.video_keywords}" class="radius-none input" size="35">
							</dvi>
						</div>
						<div class="line margin-top">
							<dvi class="x2 text-right padding-right  padding-small-top">
								视频描述
							</dvi>
							<dvi class="x10">
								<textarea name="video_description" class="input radius-none" cols="35" rows="6">{$video_info.video_description}</textarea>
							</dvi>
						</div>
						<div class="line  margin-top">
							<dvi class="x2 text-right padding-right">
								视频封面
							</dvi>
							<dvi class="x10">
								<?php if (empty($video_info['thumb_path'])): ?>
									<span class="text-red">
										系统正在为您自动截图中，请稍后按F5页面查看
									</span>
								<?php else: ?>
									<a href="javascript:void(0);" onclick="imgInfo();">
										<img src="{$video_info.thumb_path}" class="border radius padding-small" id="video_thumb" width="150" height="120">
									</a>
								<?php endif; ?>
							</dvi>
						</div>
						<div class="line  margin-top">
							<dvi class="x2 text-right padding-right">
								视频预览
							</dvi>
							<dvi class="x10">
								<div id="player"></div>
							</dvi>
						</div>
						<div class="line  margin-top">
							<dvi class="x2">
								<input type="hidden" name="id" value="{$video_info.video_id}" />
							</dvi>
							<dvi class="x10">
								<button class="button bg-blue radius-none">
									发布视频
								</button>
							</dvi>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	var QINIU_DOMAIN = "{:C('QINIU_DOMAIN')}";
	var VIDEO_INFO_KEY = "{$video_info.default_key}";
	var PUBLIC_PATH = "__PUBLIC__";
	var PLAYER_WIDTH = 400;
	var PLAYER_HEIGHT = 300;
	function imgInfo(){
		layer.open({
		  type: 1,
		  title: false,
		  closeBtn: 0,
		  area: ['450px', '400px'],
		  skin: 'layui-layer-nobg', //没有背景色
		  shadeClose: true,
		  content: "<img src='{$video_info.thumb_path}' width='450' height='400' />"
		});
	}	
</script>
<script type="text/javascript" src="__PUBLIC__/ckplayer/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript" src="{:__JS__}/player.js" charset="utf-8"></script>
<include file="Public/Footer" />